home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1997-2002 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- global proc setRenderFlagsWindow( )
- //
- // This procedure sets the mode the Render Flags
- // window is in. To add new modes, simply add new
- // itemFilters, a menu item to the optionMenu
- // that controls this itemFilter, and new cases
- // in the following procedure to set the channels
- // the channel box is showing, and the filter the
- // outliner is using for the objects it's showing
- // in the Render Flags outliner.
- {
- // Get the mode the user is currently in
- // in order to switch the contents of the
- // render flags window to the appropriate
- // filter mode
- //
- string $mode = `optionMenu -q -v rndFlagsShowMenu`;
- switch( $mode ) {
- case "Objects":
- outlinerEditor -e -filter geomFilter rndFlagsOutliner;
- channelBox -e -fal {"visibility",
- "doubleSided",
- "opposite",
- "smoothShading",
- "motionBlur",
- "visibleInReflections",
- "visibleInRefractions",
- "castsShadows",
- "receiveShadows",
- "geometryAntialiasingOverride",
- "antialiasingLevel",
- "shadingSamplesOverride",
- "shadingSamples",
- "maxShadingSamples",
- "volumeSamples",
- "volumeSamplesOverride",
- "maxVisibilitySamples",
- "maxVisibilitySamplesOverride",
- "primaryVisibility",
- "boundingBoxScaleX",
- "boundingBoxScaleY",
- "boundingBoxScaleZ",
- "featureDisplacement",
- "initialSampleRate",
- "extraSampleRate",
- "textureThreshold",
- "normalThreshold",
- "fixTextureWarp",
- "gridDivisionPerSpanU",
- "gridDivisionPerSpanV"}
- rndFlagsChannelBox;
- break;
-
- case "Lights":
- outlinerEditor -e -filter lightFilter rndFlagsOutliner;
- channelBox -e -fal {"intensity",
- "colorR",
- "colorG",
- "colorB",
- "coneAngle",
- "decayRate",
- "useDecayRegions",
- "emitDiffuse",
- "emitSpecular",
- "useRayTraceShadows",
- "shadowRays",
- "useDepthMapShadows",
- "shadColorR",
- "shadColorG",
- "shadColorB"}
- rndFlagsChannelBox;
- break;
-
- case "Dynamics":
- outlinerEditor -e -filter dynFilter rndFlagsOutliner;
- channelBox -e -fal {"visibility",
- "dynamicsWeight",
- "magnitude",
- "attenuation",
- "maxDistance",
- "applyPerVertex",
- "rate",
- "betterIllumination",
- "surfaceShading",
- "threshold",
- "radius",
- "radius0",
- "radius1",
- "tailSize",
- "motionBlur",
- "visibleInReflections",
- "visibleInRefractions",
- "castsShadows",
- "receiveShadows",
- "geometryAntialiasingOverride",
- "antialiasingLevel",
- "shadingSamplesOverride",
- "shadingSamples",
- "maxShadingSamples",
- "volumeSamples",
- "volumeSamplesOverride",
- "maxVisibilitySamples",
- "maxVisibilitySamplesOverride",
- "primaryVisibility"}
- rndFlagsChannelBox;
- break;
-
- case "Cameras":
- outlinerEditor -e -filter cameraFilter rndFlagsOutliner;
- channelBox -e -fal {"renderable",
- "focalLength",
- "nearClipPlane",
- "farClipPlane",
- "horizontalFilmAperture",
- "verticalFilmAperture",
- "horizontalFilmOffset",
- "verticalFilmOffset",
- "lensSqueezeRatio",
- "image",
- "mask",
- "depth",
- "backgroundColorR",
- "backgroundColorG",
- "backgroundColorB",
- "size",
- "offset",
- "type",
- "fit",
- "displayMode",
- "displayOnlyIfCurrent",
- "lockedToCamera",
- "geometryAntialiasingOverride",
- "antialiasingLevel",
- "shadingSamplesOverride",
- "shadingSamples",
- "maxShadingSamples"
- }
- rndFlagsChannelBox;
- break;
-
- case "Materials":
- outlinerEditor -e -filter materialFilter rndFlagsOutliner;
- channelBox -e -fal {"colorR",
- "colorG",
- "colorB",
- "transparencyR",
- "transparencyG",
- "transparencyB",
- "ambientColorR",
- "ambientColorG",
- "ambientColorB",
- "diffuse",
- "translucence",
- "translucenceFocus",
- "translucenceDepth",
- "cosinePower",
- "eccentricity",
- "specularRollOff",
- "roughness",
- "highlightSize",
- "reflectivity",
- "specularColorR",
- "specularColorG",
- "specularColorB",
- "hideSource",
- "glowIntensity",
- "refractions",
- "refractiveIndex",
- "reflectionLimit",
- "refractionLimit",
- "surfaceThickness",
- "shadowAttenuation",
- "lightAbsorbance",
- "chromaticAberration",
- "density",
- "fastDropOff",
- "useDistance",
- "useLayer",
- "useHeight",
- "noise",
- "noiseFreq",
- "noiseAspect",
- "shadingMapColorR",
- "shadingMapColorG",
- "shadingMapColorB"
- }
- rndFlagsChannelBox;
- break;
-
-
- case "Textures":
- outlinerEditor -e -filter textureFilter rndFlagsOutliner;
- channelBox -e -fal {"visibility",
- "repeatU",
- "repeatV",
- "rotateUV",
- "noiseU",
- "noiseV",
- "wrapU",
- "wrapV",
- "mirrorU",
- "mirrorV",
- "stagger",
- "coverageU",
- "coverageV",
- "rotateFrame",
- "translateFrameU",
- "translateFrameV",
- "colorGainR",
- "colorGainG",
- "colorGainB",
- "colorOffsetR",
- "colorOffsetG",
- "colorOffsetB",
- "defaultColorR",
- "defaultColorG",
- "defaultColorB",
- "alphaGain",
- "alphaOffset",
- "filter",
- "filterOffset"}
- rndFlagsChannelBox;
- break;
-
- case "General":
- outlinerEditor -e -filter globalRndFilter rndFlagsOutliner;
- channelBox -e -fal {"renderAll",
- "animation",
- "startFrame",
- "endFrame",
- "byFrameStep",
- "maximumMemory",
- "motionBlur",
- "width",
- "height",
- "edgeAntiAliasing",
- "useMultiPixelFilter",
- "shadingSamples",
- "maxShadingSamples",
- "volumeSamples",
- "particleSamples",
- "visibilitySamples",
- "maxVisibilitySamples",
- "enableRaytracing",
- "enableDepthMaps"}
- rndFlagsChannelBox;
- break;
- }
- }
-
- //
- // Alias|Wavefront Script File
- // MODIFY THIS AT YOUR OWN RISK
- //
- // Creation Date: 15 April, 1997
- // Author: Luca Vezzadini
- //
- // Procedure Name:
- // renderFlagsWindow
- //
- // Description:
- // Creates a tab for the transform tools in the toolbox.
- //
- // Input Arguments:
- // The parent control that the tab will be created in.
- //
- // Return Value:
- // None.
- //
-
- global proc renderFlagsWindow ()
- {
- if (!`window -exists renderFlagsWindow`)
- {
- // Need to create the window
- //
- window
- -w 400
- -h 450
- -menuBar true
- -title "Rendering Flags"
- -iconName "Render Flags"
- renderFlagsWindow;
-
-
- // Adds support for the Context Sensitive Help Menu.
- //
- addContextHelpProc "renderFlagsWindow" "buildRenderFlagsContextHelpItems";
-
- doHelpMenu("renderFlagsWindow", "renderFlagsWindow");
-
- formLayout -nd 5 rndFlagsForm;
-
- columnLayout rndFlagsRow;
- optionMenu -l "Show:" -cc "setRenderFlagsWindow" rndFlagsShowMenu;
- menuItem -l "Objects";
- menuItem -l "Lights";
- menuItem -l "Dynamics";
- menuItem -l "Cameras";
- menuItem -l "Textures";
- menuItem -l "Materials";
- menuItem -l "General";
- setParent -m ..;
- setParent ..;
-
- separator -style "in" rndFlagsSep1;
-
- if (!`itemFilter -exists geomFilter`) {
- // create a filter for geometry objects
- //
- itemFilter
- //-parent "renderFlagsWindow"
- //-byType "geometryShape" geomFilter;
- -byType "surfaceShape"
- -byType "renderSphere"
- -byType "renderCone"
- geomFilter;
-
- // create a filter for cameras
- //
- itemFilter
- //-parent "renderFlagsWindow"
- -byType "camera"
- -byType "imagePlane" cameraFilter;
-
- // create a filter for dynamics
- //
- itemFilter
- //-parent "renderFlagsWindow"
- -byType "particle"
- -byType "rigidBody"
- -byType "field" dynFilter;
-
- // create a filter for lights
- //
- itemFilter
- //-parent "renderFlagsWindow"
- -byType "light" lightFilter;
-
- // create a filter for render globals
- //
- itemFilter
- //-parent "renderFlagsWindow"
- -byType "renderGlobals"
- -byType "resolution"
- -byType "renderQuality" globalRndFilter;
-
- // create a filter for textures
- //
- itemFilter
- //-parent "renderFlagsWindow"
- -byType "place3dTexture"
- -byType "place2dTexture"
- -byType "texture3d"
- -byType "texture2d"
- -byType "textureEnv" textureFilter;
-
-
- // create a filter for materials
- //
- itemFilter
- //-parent "renderFlagsWindow"
- -byType "lambert"
- -byType "lightFog"
- -byType "useBackground"
- -byType "shadingMap" materialFilter;
- }
-
- frameLayout
- -lv false
- -bs "in" -bv true
- -cll false -cl false
- rndFlagsFrame;
-
- formLayout rndFlagsControlForm;
-
- // put an outliner in the window and attach it to the left.
- // This outliner reads from the "world" list, and outputs
- // its selected objects to the selected list
- //
- outlinerEditor
- -mainListConnection worldList
- -selectionConnection activeList
- -ignoreDagHierarchy true
- -filter geomFilter
- -showShapes true
- -showDagOnly false
- -highlightActive true
- -autoSelectNewObjects false
- rndFlagsOutliner;
-
- // create a channelBox and put it on the right
- // hand side of the window. Use the output of the outliner
- // as the input of the channelBox.
- //
- channelBox
- -fal {"visibility","doubleSided","opposite","smoothShading",
- "motionBlur","visibleInReflections","visibleInRefractions",
- "castsShadows",
- "receiveShadows",
- "geometryAntialiasingOverride", "antialiasingLevel",
- "shadingSamplesOverride", "shadingSamples", "maxShadingSamples",
- "volumeSamples", "volumeSamplesOverride",
- "maxVisibilitySamples", "maxVisibilitySamplesOverride",
- "bmv","primaryVisibility",
- "boundingBoxScaleX", "boundingBoxScaleY", "boundingBoxScaleZ",
- "featureDisplacement", "initialSampleRate", "extraSampleRate",
- "textureThreshold", "normalThreshold",
- "fixTextureWarp", "gridDivisionPerSpanU", "gridDivisionPerSpanV" }
- -mainListConnection activeList
- -showTransforms false
- -longNames true
- -width 250
- rndFlagsChannelBox;
-
- setParent ..;
- setParent ..;
-
- formLayout -e
- -af rndFlagsOutliner top 0
- -af rndFlagsOutliner left 0
- -af rndFlagsOutliner bottom 0
- -ac rndFlagsOutliner right 0 rndFlagsChannelBox
-
- -af rndFlagsChannelBox top 0
- -af rndFlagsChannelBox right 0
- -af rndFlagsChannelBox bottom 0
- -an rndFlagsChannelBox left
- rndFlagsControlForm;
-
- separator -style "in" rndFlagsSep2;
-
- button -l "Close"
- -c "deleteUI renderFlagsWindow"
- -height 26
- rndFlagsDelBtn;
-
- // Do all the attachments
- //
- formLayout -e
- -af rndFlagsRow top 0
- -af rndFlagsRow left 0
- -an rndFlagsRow bottom
-
- -ac rndFlagsFrame top 0 rndFlagsRow
- -af rndFlagsFrame left 0
- -af rndFlagsFrame right 0
- -ac rndFlagsFrame bottom 5 rndFlagsDelBtn
-
- -an rndFlagsDelBtn top
- -af rndFlagsDelBtn left 5
- -af rndFlagsDelBtn right 5
- -af rndFlagsDelBtn bottom 5
- rndFlagsForm;
- }
-
- // Show the window
- //
- showWindow renderFlagsWindow;
- }
-
- //////////////////////////////////////////////////////////////////////
- //
- // Procedure Name:
- // buildRenderFlagsContextHelpItems
- //
- // Description:
- // Build context sensitive menu items for the render flags.
- //
- // Input Arguments:
- // $nameRoot - name to use as the root of all item names
- // $menuParent - the name of the parent of this menu
- //
- // Return Value:
- // None
- //
- global proc buildRenderFlagsContextHelpItems(string $nameRoot, string $menuParent)
- {
- menuItem -label "Help on Render Flags..."
- -enableCommandRepeat false
- -command "showHelp RenderingFlags";
- }
-
-